package org.remixlab.gnutopic.client;

import remixlab.proscene.CameraProfile;
import remixlab.proscene.Scene;

public class GNUTopicCP extends CameraProfile {
  public GNUTopicCP(Scene scn, String name) {
    super(scn, name);
    // 1. Perform some keyboard configuration (warning: camera profiles override those of the scene):
    // 's' (note the caps) = move the camera to show all the scene
    setShortcut('s', Scene.CameraKeyboardAction.INTERPOLATE_TO_FIT_SCENE);
    // 2. Describe how to control the camera:
    // mouse left button = translate camera
    setCameraMouseBinding(Scene.Button.LEFT.ID, Scene.MouseAction.ROTATE);
    // Right button = zoom
    setCameraMouseBinding(Scene.Button.RIGHT.ID, Scene.MouseAction.ZOOM);
    setCameraWheelBinding( Scene.MouseAction.ZOOM );

    // 4. Configure some click actions:
    // double click + button left = align frame with world
    setClickBinding(Scene.Button.LEFT, 2, Scene.ClickAction.ALIGN_CAMERA);
    // single click + middle button + SHIFT + ALT = interpolate to show all the scene
    setClickBinding(Scene.Button.MIDDLE, 2, Scene.ClickAction.ZOOM_TO_FIT);
    // double click + button right = align camera with world
    setClickBinding(Scene.Button.RIGHT, 2, Scene.ClickAction.ALIGN_CAMERA);
  }
}
